set(source_files Main.cpp)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
add_executable(toast ${source_files} toast.rc)
target_include_directories(toast PRIVATE
${PROJECT_SOURCE_DIR}
)
# 资源压缩，跟可执行文件打包到相同目录
add_custom_target(toast_skinzip
    COMMAND ${CMAKE_COMMAND} -E tar "c" ${CMAKE_CURRENT_BINARY_DIR}/skin.zip --format=zip .
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/skin
)
add_dependencies(toast duilib toast_skinzip)
target_link_libraries(toast duilib)
set_target_properties(toast PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")